package StudyCode.summary.mycollection;

import java.util.Arrays;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class AppendElementToEnlargedArray {
	public static <T> T[] append(T[] array, T element) {
		final int N = array.length;
		array = Arrays.copyOf(array, N + 1);
		array[N] = element;

		return array;
	}
}
